package com.nlx.notes.module.core.enums.error;

import com.nlx.notes.module.core.consts.ErrorCodeConst;
import com.nlx.notes.support.handler.exception.ErrorCode;
import lombok.Getter;

@Getter
public enum LoanCodeEnum implements ErrorCode {

    SAVE_ERROR_UNKNOWN_ERROR(1, "保存数据失败，发生未知错误"),
    DATA_NOT_EXISTS_ERROR(2,"数据不存在"),
    BILL_SETTLE_NOT_REPAY_ERROR(3,"当前账单已结清，无需重复还款"),
    OPERATION_FAIL_ERROR(4,"操作失败"),
    LOAN_BORROWER_NAME_NOT_EXISTS_ERROR(5,"借款人不存在"),
    PLEASE_CHOOSE_REPLY_ACCOUNT_ERROR(6,"请选择还款账户"),
    ;

    private final int code;

    private final String message;

    LoanCodeEnum(int code, String message) {
        this.code = ErrorCodeConst.LOAN_ERROR_CODE_SUFFIX + code;
        this.message = message;
    }

}
